home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Megahits 6
/
Megahits 6 (1995)(GTI - Rhein-Main-Soft)(DE)(Disc 2 of 2)[!].iso
/
time_ungepackt
/
time_361_390
/
time_375
/
m&m3.13
/
examples
/
rexxtest.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-07-15
|
4KB
|
191 lines
/* RexxTest mit Menus&More */
/* §VER: 1.00 (02.02.95) */
/* © 1995 by Axel Sodtalbers, Göttingen */
OPTIONS RESULTS /* Init */
ADDRESS "MMPlayer"
'ALOHAPLAYER'
oldmsg = ''
'DrawColor 0'
'DrawRectFill 190, 190, 300, 210'
'SwitchButton 0, 0' /* Beide Buttons ausschalten */
'SwitchButton 1, 0'
'SwitchTitle 0'
/* -------------------------------------------------------- */
call MessageOut '"Query Function..."'
msg = "'Query is giving the following results:||||"
msg = msg || 'PlLeft : '
'QUERY PLLEFT'
msg = msg || RESULT || '||PlTop : '
'QUERY PLTOP'
msg = msg || RESULT || '||PlWidth : '
'QUERY PLWIDTH'
msg = msg || RESULT || '||PlHeight : '
'QUERY PLHEIGHT'
msg = msg || RESULT || '||PlPlanes : '
'QUERY PLPLANES'
msg = msg || RESULT || '||PlColors : '
'QUERY PLCOLORS'
msg = msg || RESULT || '||MMRexxDebug : '
'QUERY MMREXXDEBUG'
msg = msg || RESULT || '||IsGerman : '
'QUERY ISGERMAN'
msg = msg || RESULT || "||'"
'Req' msg 'Understood'
/* -------------------------------------------------------- */
AX = 100
AY = 40
AW = 440
AH = 130
'DrawColor 1'
'DrawRectFill' AX AY AX + AW AY + AH
call MessageOut '"Testing: DrawLine Function..."'
'SetWaitPointer' /* DrawLine */
col = 4
'DrawColor' col
do px=AX to AX + AW by 4
'DrawLine' AX AY px AY + AH
'DrawColor' col
col = col + 1
if col = 8 then col=4
end
col = 4
do px=AX + AW to AX by -4
'DrawLine' AX + AW AY px AY + AH
'DrawColor' col
col = col + 1
if col = 8 then col=4
end
col = 4
do px=AX to AX + AW by 4
'DrawLine' AX AY + AH px AY
'DrawColor' col
col = col + 1
if col = 8 then col=4
end
col = 4
do px=AX + AW to AX by -4
'DrawLine' AX + AW AY + AH px AY
'DrawColor' col
col = col + 1
if col = 8 then col=4
end
'ResetPointer'
Call Wait
Call MessageOut "'DrawCircle Function...'"
do rad=20 to 60 BY 3
'DrawColor' random(4,7)
'DrawCircle' (AX+(AX+AW))/2 (AY+(AY+AH))/2 rad
end
Call Wait
Call MessageOut "'DrawRectangle Function...'" /* DrawRectangle */
x1 = ax
y1 = ay
x2 = ax+aw
y2 = ay+ah
do while y2>(AY+(AY+AH))/2
x1 = x1+3
y1 = y1+3
x2 = x2-3
y2 = y2-3
'DrawColor' random(4,7)
'DrawRectangle' x1 y1 x2 y2
end
Call Wait
Call MessageOut "'DrawRectFill Function...'" /* DrawRectFill */
x1 = ax
y1 = ay
x2 = ax+aw
y2 = ay+ah
do while y2>(AY+(AY+AH))/2
x1 = x1+3
y1 = y1+3
x2 = x2-3
y2 = y2-3
'DrawColor' random(4,7)
'DrawRectFill' x1 y1 x2 y2
end
Call Wait
Call MessageOut "'Some pixels now...'" /* DrawPixel */
do px=1 to 100
'DrawColor' random(4,7)
'DrawPixel' random(ax, ax+aw) random(ay,ay+ah)
end
Call Wait
Call MessageOut "'And now some other requesters...'" /* Reqs */
"ReqFile 'Select a file!' S:Startup-Sequence"
Call MessageOut "'Your selection: " || RESULT || "'"
Call Wait
"ReqDir 'Select a drawer!' RAM:"
Call MessageOut "'Your selection: " || RESULT || "'"
Call Wait
'ReqString "Please type in some text now!" YourText'
Call MessageOut "'Your selection: " || RESULT || "'"
Call Wait
'Req "Now we are switching||to another screen..." "Do the switch!"'
'SwitchScreen "MM:Examples/Logo.pic"'
'Req "Okay, folks - that was the Menus&More ARexx Demo||Always remember: Be careful - you might be eaten by a grue!||" "Zork!"'
/* -------------------------------------------------------------- */
'SwitchButton 0, 1' /* Beide Buttons */
'SwitchButton 1, 1' /* wieder einschalten */
'QUIT'
exit
MessageOut: /* Demo-Typ auf Bildschirm */
procedure expose oldmsg
parse arg msg
'DrawColor 0'
'DrawText 200, 200,' oldmsg
oldmsg = msg
'DrawColor 4'
'DrawText 200, 200,' msg
return
Wait: /* Auf Mausklick warten */
'SwitchTitle 1'
'SetTitle "Please press left mouse button or space-key!"'
'WaitForLMB'
'SwitchTitle 0'
'DrawColor 1'
'DrawRectFill' AX AY AX + AW AY + AH
return